package per.ace.configuration.demo.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @program: springbootDemo
 * @description: 引入的配置bean
 * @author: ace
 * @Date: 2019-12-29 15:04
 **/
@Component
@PropertySource(value = {"boy.properties"})
public class MyPropertiesBean {

    @Value("${name}")
    private String name;
    @Value("${age}")
    private String age;

    public String getName() {
        return name;
    }

    public String getAge() {
        return age;
    }
}
